package com.dustedpixels.jasmin.machines.spectrum.video;

public interface BackgroundVideo {
    /**
     * Returns background data as byte array of 352*288 length. First 352 bytes
     * contains first pixel row, next 352 bytes contains next pixel row, etc...
     * Each pixel is represented as byte value from range 0..7.
     * 
     * @return
     */
    byte[] getData();
    
    /**
     * Returns unit phase.
     * 
     * @return
     */
    int getPhase();
    
    /**
     * Sets unit phase.
     */
    void setPhase();
    
    /**
     * Processes single unit step. Phase is increased by 1.
     */
    void processStep();
    
    /**
     * Sets current color as value from range 0..7.
     * 
     * @param color The color value.
     */
    void setColor(byte color);
    
    /**
     * Returns current color as value from range 0..7.
     * 
     * @return The color value.
     */
    byte getColor();
}
